<?php
if(!isset($_SESSION)) 
	{ 
		session_start(); 
	}
include '../operations/connection.php';	

$idemployee = $_REQUEST['vlemployee'];
$funame = $_REQUEST['funame'];
$identity = $_REQUEST['identity'];
$bankname = $_REQUEST['bankname'];
$accountnum = $_REQUEST['accountnumber'];
$phone = $_REQUEST['phone'];
$email = $_REQUEST['mail'];
$address = $_REQUEST['address'];
$birthday = $_REQUEST['birthday'];


if(isset($_REQUEST['updateprofile'])){
$sqlupdate = "UPDATE employee e set e.FullName='$funame',e.CMND='$identity',e.BankName='$bankname',
	e.BankAccount='$accountnum',e.Phone='$phone',e.Email='$email',e.Address='$address',e.Birthday ='$birthday' 
	 WHERE e.IDEmployee = '$idemployee';";
mysql_query($sqlupdate);

}

mysql_close($connection);

if(isset($_REQUEST['updateprofile'])){
	$_SESSION['alert'] ="";
	header("Location: ../yourProfile.php");
	
}
?>